<cfparam default="" name="PageType" />

<cfoutput>
	<!---HTML header, css links, js links, and page title--->
    #BASE.htmlHeader("", "", "Elder's Program - Reports")#
    <!---HTML header, css links, js links, and page title--->  
    
    <!---UnDupServices, UnDupMeals, UnDupServiceOrMeals is set in showreport--->
    
	<cfif PageType EQ "PDF" >   
     
        <cfdocument format="pdf" fontembed="yes">

            <table width="100%">
                <tbody>
                    <tr>
                        <td>
                            <img src="images/reportHeader.JPG" />
                        </td>
                    </tr>
                    <tr>
                        <td style="margin-left:125px;">
                        
                            <table width="100%">
                                <tbody>
                                    <tr>
                                        <td colspan="2">
                                            <strong>Services for Elders From #url.DateFrom# to #url.DateTo#</strong>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            <strong>Elders</strong>
                                        </th>
                                        <td align="left">
                                            <strong>Services</strong>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            #UnDupServices.CountOfElderID#
                                        </td>
                                        <td>
                                            #UnDupServices.SumOfServiceCounts#
                                        </td>
                                    </tr>
                                </tbody>
                                
                                <tbody>
                                    <tr>
                                        <td colspan="2">&nbsp;</td>
                                    </tr>
                                </tbody>
                                
                                <tbody>
                                    <tr>
                                        <td colspan="2">
                                            <strong>Meals for Elders From #url.DateFrom# to #url.DateTo#</strong>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            <strong>Elders</strong>
                                        </th>
                                        <td align="left">
                                            <strong>Meals</strong>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            #UnDupMeals.CountOfElderID#
                                        </td>
                                        <td>
                                            #UnDupMeals.SumOfMealCount#
                                        </td>
                                    </tr>
                                </tbody>
                                
                                <tbody>
                                    <tr>
                                        <td colspan="2">&nbsp;</td>
                                    </tr>
                                </tbody>
                                
                                <tbody>
                                    <tr>
                                        <td colspan="2">
                                            <strong>Serivce or Meals From #url.DateFrom# to #url.DateTo#</strong>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            <strong>Elders</strong>
                                        </th>
                                        <td align="left">
                                            <strong>Services or Meals</strong>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            #UnDupServiceOrMeals.CountOfID#
                                        </td>
                                        <td>
                                            #UnDupServiceOrMeals.SumOfServiceOrMeal#
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            
                        </td>
                    </tr>
                </tbody>
            </table>
        </cfdocument>
    
    <cfelse>
    
        <h2>Undup Services</h2> 
         
        <table width="100%">
            <tbody>
                <tr>
                    <td style="margin-left:125px;">
                    
                        <table width="100%">
                            <tbody>
                                <tr>
                                    <th colspan="2">
                                        <strong>Services for Elders From #url.DateFrom# to #url.DateTo#</strong>
                                    </th>
                                </tr>
                                <tr>
                                    <th align="left">
                                        <strong>Elders</strong>
                                    </th>
                                    <th align="left">
                                        <strong>Services</strong>
                                    </th>
                                </tr>
                                <tr>
                                    <td>
                                        #UnDupServices.CountOfElderID#
                                    </td>
                                    <td>
                                        #UnDupServices.SumOfServiceCounts#
                                    </td>
                                </tr>
                            </tbody>
                            
                            <tbody>
                                <tr>
                                    <th colspan="2">&nbsp;</th>
                                </tr>
                            </tbody>
                            
                            <tbody>
                                <tr>
                                    <th colspan="2">
                                        <strong>Meals for Elders From #url.DateFrom# to #url.DateTo#</strong>
                                    </th>
                                </tr>
                                <tr>
                                    <th align="left">
                                        <strong>Elders</strong>
                                    </th>
                                    <th align="left">
                                        <strong>Meals</strong>
                                    </th>
                                </tr>
                                <tr>
                                    <td>
                                        #UnDupMeals.CountOfElderID#
                                    </td>
                                    <td>
                                        #UnDupMeals.SumOfMealCount#
                                    </td>
                                </tr>
                            </tbody>
                            
                            <tbody>
                                <tr>
                                    <th colspan="2">&nbsp;</th>
                                </tr>
                            </tbody>
                            
                            <tbody>
                                <tr>
                                    <th colspan="2">
                                        <strong>Serivce or Meals From #url.DateFrom# to #url.DateTo#</strong>
                                    </th>
                                </tr>
                                <tr>
                                    <th align="left">
                                        <strong>Elders</strong>
                                    </th>
                                    <th align="left">
                                        <strong>Services or Meals</strong>
                                    </th>
                                </tr>
                                <tr>
                                    <td>
                                        #UnDupServiceOrMeals.CountOfID#
                                    </td>
                                    <td>
                                        #UnDupServiceOrMeals.SumOfServiceOrMeal#
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        
                    </td>
                </tr>
            </tbody>
        </table>
        
    </cfif>
        
    <!---HTML footer, closes html and body tags.  Any footer info goes here--->
    #BASE.htmlFooter()#
    <!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>